<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script>
    var a = function() {
           alert(this.name)
    }
    function Obj(name,age,gender) {
       this.name = name,
       this.age = age,
       this.gender = gender
       this.seyHelle = a;
    }
    
    var b = new Obj("张三",19,"男");
    console.log(b);
    b.seyHelle();
    //使用instanceof可以判断一个对象是否是一个类的实例
    console.log(b instanceof Obj);
    //只要创建函数，他就会自动创建一个prototype
    console.log(a.prototype);
</script>
<body>
    
</body>
</html>